home *** CD-ROM | disk | FTP | other *** search
/ Aminet 41 / Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso / Aminet / gfx / edit / AmiCAD_2.06.lha / AmiCAD / ARexx / Souligner.AmiCAD < prev    next >
Text File  |  2000-04-14  |  976b  |  42 lines

  1. /* Soulignement d'un ou plusieurs textes
  2.     Version 1.00: 17 septembre 1998
  3.     Version 1.01: 14 avril 2000 (adaptation version 2.05)
  4. $VER: Souligner 1.01 (© R.Florac, 14 avril 2000 */
  5.  
  6. options results
  7.  
  8. signal on error
  9. signal on syntax
  10.  
  11. objets=0
  12. 'SAVEALL:FIRSTSEL'; i=result
  13. do while i>0
  14.     objets = objets + souligner(i)
  15.     'NEXTSEL('i')'; i=result
  16. end
  17. if objets=0 then do
  18.     'PICKOBJ("Sélectionnez le texte à souligner")'
  19.     i=result
  20.     if i>0 then call souligner(i)
  21. end
  22. exit
  23.  
  24. souligner: procedure
  25.     parse arg i
  26.     'TYPE(O__='i')'; type=result
  27.     if type = 4 | type = 5 | type = 6 then do
  28.     'DRAW(COL(O__),LINE(O__)+1,COL(O__)+WIDTH(O__)+1,LINE(O__)+1)'
  29.     return 1
  30.     end
  31. return 0
  32.  
  33. /* Traitement des erreurs, interruption du programme */
  34. syntax:
  35. erreur=RC
  36. 'MESSAGE("Script Souligner.AmiCAD"+CHR(10)+"Erreur de syntaxe"+CHR(10)+"en ligne 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
  37. exit
  38.  
  39. error:
  40. 'MESSAGE("Script Souligner.AmiCAD"+CHR(10)+"Erreur en ligne 'SIGL'")'
  41. exit
  42.